<div class="card">

    <div class="card-header">
        <button type="button" class="btn btn-outline-success" (click)="addNews()">添加</button>
    </div>
  
    <div class="card-body">
  <table class="table table-hover">
  <tr>
    <td>序号</td>
    <td>主键</td>
    <td>标题</td>
    <td>作者</td>
    <td>发布时间</td>
    <!-- <td>内容</td> -->
    <td>封面</td>
    <td>操作</td>
  </tr>
  <tr *ngFor="let n of n1">
    <td>{{n.px}}</td>
    <td>{{n.newsid}}</td>
    <td>{{n.title}}</td>
    <td>{{n.author}}</td>
    <td>{{n.pbdate | date:'yyyy-MM-dd HH:mm'}}</td>
    <td>
      <!-- <img width="200px" height="200px" src="{{HOST}}{{n.coverpic}}" *ngIf="n.coverpic"/> -->
      <img width="200px" height="200px" src="{{n.coverpic}}" *ngIf="n.coverpic"/>
      <input type="file" (change)="onFileChanged($event)"/>
    </td>
    <!-- <td>
      <div [innerHTML]="n.content | tohtml"></div>
    </td> -->
    <td>
        <button type="button" class="btn btn-outline-warning" (click)="updateNews(n.newsid)">修改</button>
        <button type="button" class="btn btn-outline-danger" (click)="deleteNews(n.newsid)">删除</button>
        <button type="button" class="btn btn-outline-info" (click)="toDetail(n.newsid)">预览</button>
        <button type="button" class="btn btn-outline-success" (click)="uploadNewsCover(n.newsid)">上传封面</button>
    </td>
  </tr>
  </table>
  </div>
  
  <div class="card-foot">
    <nav aria-label="Page navigation example">
      <ul class="Pagination" style="float:left">
        <li class="page-item" style="float:left;list-style-type:none"><a class="page-link" href="#">Previous</a></li>
        <li class="page-item" style="float:left;list-style-type:none"><a class="page-link" href="#">1</a></li>
        <li class="page-item" style="float:left;list-style-type:none"><a class="page-link" href="#">2</a></li>
        <li class="page-item" style="float:left;list-style-type:none"><a class="page-link" href="#">3</a></li>
        <li class="page-item" style="float:left;list-style-type:none"><a class="page-link" href="#">Next</a></li>
      </ul>
   </nav>
  </div>

  
  </div>

  <div class="card">
  
          </div>
